package 线程;

import 注解.Person;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * @author: 谢君臣
 * @Date: 2021/11/17-11:47
 * @version: 1.0
 * @function:  -Xms20m -Xmx20m -XX:+PrintGCDetails
 */
public class TestThreadLocal {

    public static void main(String[] args) {
        ThreadLocal<Map<String, Person>> tx = new ThreadLocal<>();
        Map<String,Person> map = new HashMap<>();
        map.put("person",new Person(1,"张三",18));
        tx.set(map);
        tx = null;
        for (int i = 0; i < 10; i++) {
           byte[] bytes = new byte[1024*1024*2];
        }
    }
}
